<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>form表单上传文件(单个)</title>
</head>
<body>
<div th:fragment="index_form_simple_fragment" class="layui-bg-gray">
    <form th:action="@{/oss/uploadfile}" method="post" enctype="multipart/form-data">
        <p>仅支持PNG和JPG/JPEG格式的图片：</p>
        <input type="file" name="img" accept="image/png, image/jpg, image/jpeg"/>
        <br>
        <input type="submit" value="上传"/>
    </form>
</div>
</body>
</html>